package com.antis.olsl.magic.adapter;

import com.antis.olsl.magic.R;
import com.antis.olsl.magic.response.GetBrandEfficiencyListResp;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class BrandListAdapter extends BaseQuickAdapter<GetBrandEfficiencyListResp.ContentBean, BaseViewHolder> implements LoadMoreModule {
    public BrandListAdapter(int layoutResId, @Nullable List<GetBrandEfficiencyListResp.ContentBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, GetBrandEfficiencyListResp.ContentBean bean) {
        baseViewHolder.setText(R.id.text_product_code, bean.brandCode);
        baseViewHolder.setText(R.id.text_product_name, bean.brandName);
        baseViewHolder.setText(R.id.text_store_num, bean.storeNum);
        baseViewHolder.setText(R.id.text_profit_grade, bean.salesTotal);
    }
}
